# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=xdg-user-dirs-gtk
pkgver=0.11
pkgrel=1
pkgdesc="Creates user dirs and asks to relocalize them"
url="https://gitlab.gnome.org/GNOME/xdg-user-dirs-gtk"
arch=(x86_64)
license=(GPL)
depends=(gtk3 xdg-user-dirs)
makedepends=(intltool git)
groups=(gnome)
options=(debug)
_commit=cf2a85fa5370aa7cdf36d1c8259ca89d3d737ef9  # tags/0.11^0
source=("git+https://gitlab.gnome.org/GNOME/xdg-user-dirs-gtk.git#commit=$_commit"
        show-in-mate.diff)
sha256sums=('SKIP'
            '80bd751b9bfc95e06775da31ff1ae32417bfca2df3b9e063d478b056834224f3')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
  git apply -3 ../show-in-mate.diff
  autoreconf -fvi
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --disable-more-warnings
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set sw=2 sts=-1 et:
